<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	    <style>
	    	.blue{color:blue};
	    </style>
	</head>
	<body>
		<!--页面导航-->
		<div class="alert alert-success" role="alert">
			<a href="{{U('Form/index')}}">类型列表</a>&nbsp; > {{$formData['fname']}}&nbsp; > 属性列表
		</div>
		<p>
			<a href="{{U('Fattr/add',array('fid'=>$fid))}}" class="btn btn-success btn-sm">添加属性</a>&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="" class="btn btn-warning btn-sm">批量删除</a>&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="{{U('Form/index')}}" class="btn btn-info btn-sm">返回</a>
		</p>
		<input type="hidden" name="fid" value="{{$fid}}" />
		<table class="table table-hover">
			<tr class="active">
			 <th width="20"><input type="checkbox" name="" id="" /></th>
			  <th>属性ID</th>
			  <th>属性名称</th>
			  <th>规格/属性</th>
			  <th>属性值</th>
			  <th width="350">操作</th>
			</tr>
			{{foreach from="$data" key="$k" value="$v"}}
			<tr>
				<td><input type="checkbox" name="" id="" /></td>
				<td>{{$v['fa_id']}}</td>
				<td>{{$v['fattr_name']}}</td>
				<td>
					{{if value="$v['fattr_type']==0"}}
					<span class="blue">规格</span>
					{{else}}
					<span>属性</span>
					{{endif}}
				</td>
				<td>{{$v['fattr_value']}}</td>
				<td>
					<a href="{{U('edit',array('fa_id'=>$v['fa_id']))}}" class="btn btn-sm btn-primary">编辑</a>&nbsp;
					<a href="javascript:if(confirm('确定删除？')) location.href='{{U('del',array('fa_id'=>$v['fa_id']))}}';" class="btn btn-sm btn-danger">删除</a>
				</td>
			</tr>
			{{endforeach}}
		</table>
		<center>
			<div class="pagination">
				<ul>{{$page}}</ul>
			</div>
		</center>
	</body>
</html>
